package com.thy.controller;

import com.hospital.common.base.Result;
import com.hospital.common.pojo.TTitle;
import com.thy.service.TTitleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 医生职称接口
 * @author yhn
 * @version 1.0
 */
@RestController
@RequestMapping("/title")
public class TitleController {
    @Autowired
    private TTitleService titleService;

    /**
     * 查询所有职称
     */
    @GetMapping("/queryAll")
    public Result<List<TTitle>> queryAll(){
        return Result.success(titleService.queryAll());
    }
}
